<?php

namespace App\Admin\Controllers;

use App\Admin\Contracts\ActionInterface;
use App\Admin\Contracts\AuthRuleInterface;

use App\Admin\Contracts\MenuInterface;
use App\Admin\Models\AuthRuleModel;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Route;


/**
 * Created by 荣耀电竞.
 * User: 林子彦 <278805354@qq.com>
 * Date: 2018/2/6 0006
 * Time: 11:12
 */
class ClientIndexController extends Controller
{
    /**
     * @var AuthRuleInterface
     */
    public $iAuthRule;
    /**
     * 菜单接口
     * @var MenuInterface
     */
    private $iMenu;

    /**
     * 构造函数
     * IndexController constructor.
     */
    public function __construct()
    {
        $this->iAuthRule = app()->make(AuthRuleInterface::class);
        $this->iMenu = app()->make(MenuInterface::class);
    }

    /**
     * 行为操作表
     * @return ActionInterface
     */
    public function getActionInterface(){
        return app()->make(ActionInterface::class);
    }



    /**
     * 首页
     * @param Request $request
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function index(Request $request)
    {
        //拉取获取菜单
       // $menus = $this->getMenus();
        return view("admin.client.index");//->with(["menu" => $menus]);
    }

    /**
     * 查看
     * @param Request $request
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
   public function show(Request $request){
        return view("admin.client.show");
   }
}